Post

Replies

Boosts

Views

Activity

public core data not syncing with cloud kit
Since "The "out-of-the-box" implementation of CoreData / CloudKit sync does not, and will not, store any records in the Public database" how does one go about storing records in the public database (when I look using the CloudKit dashboard, there are only private records, nothing in public)? I know about setting databaseScope = .public in NSPersistentCloudKitContainerOptions, and about assigning freshly created managed objects to the appropriate scope (needed because my app has more than one). What else do I need to do to get syncing to work?
3
0
772
Apr ’23
NSTextView inspector bar not showing paragraph style and some other tools
The recent upgrade of the Mac OS seems to have removed some of the inspector bar tools from the NSTextView that formerly appears after setting usesInspectorBar to true. I see nothing in the documentation for any API for making these tools reappear. I notice that the TextEdit app's inspector bar is not missing them. Please tell me how to get my app's text view's inspector bar to look and behave like TextEdit.
1
0
743
Feb ’22
can anyone point me at literature describing how to locate/access an IOUSBMassStorageDriver?
i have a usb device and am writing an OS X app which sends it commands. it shows up in the ioRegistry as a IOUSBMassStorageDriver. i want to send it some commands but can't find specific enough information about how to do this. the following code finds a plain vanilla usb driver which apparently is not able to actually deliver my commands to the device. any help is appreciated. a book, a tutorial, sample code, anything which is specific about IOUSBMassStorageDriver let matchingDict = { IOProviderClass : IOUSBDevice, idProduct : 58113, idVendor : 1238 } var matchedIterator:io_iterator_t = 0 var removalIterator:io_iterator_t = 0 let notifyPort:IONotificationPortRef = IONotificationPortCreate(kIOMasterPortDefault) IONotificationPortSetDispatchQueue(notifyPort, DispatchQueue(label: "IODetector")) let matchingCallback:IOServiceMatchingCallback = { (userData, iterator) in // Convert self to a void pointer, store that in the context, and convert it let this = Unmanaged<TLUSBDeviceMonitor>.fromOpaque(userData!).takeUnretainedValue() this.rawDeviceAdded(iterator: iterator) } let removalCallback: IOServiceMatchingCallback = { (userData, iterator) in let this = Unmanaged<TLUSBDeviceMonitor>.fromOpaque(userData!).takeUnretainedValue() this.rawDeviceRemoved(iterator: iterator) } let selfPtr = Unmanaged.passUnretained(self).toOpaque() IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, matchingDict, matchingCallback, selfPtr, &matchedIterator) IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, matchingDict, removalCallback, selfPtr, &removalIterator)
5
1
1.8k
Aug ’18